package com.hzsai.rabbitmq;

import com.hzsai.aspect.MyAspect;
import org.springframework.amqp.core.Queue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * hzsai 2019/8/12
 * usage:
 **/
//@Configuration
public class RabbitMQConfig {

    //, exclude = {DataSourceAutoConfiguration.class}
    @Value("${rabbitmq.queue.msg}")
    private String msgRabbitMQName = null;

    @Value("${rabbitmq.queue.user}")
    private String userRabbitMQName = null;

    @Bean
    public Queue createRabbitMQMsg() {
        return new Queue(msgRabbitMQName, true);
    }

    @Bean
    public Queue createRabbitMQUser() {
        return new Queue(userRabbitMQName, true);
    }
}
